using System.Collections.Generic;
using UnityEngine.Analytics;

public class AnalyticsController
{
	public static void Event(string eventName)
	{
		Analytics.CustomEvent(eventName);
	}

	public static void Event(string eventName, Dictionary<string, object> data)
	{
		Analytics.CustomEvent(eventName, data);
	}

	public static void SpecialButtonPressed(SpecialButtonType buttonType)
	{
		Analytics.CustomEvent("ButtonPressed", new Dictionary<string, object>
		{
			{
				"ButtonType",
				buttonType.ToString()
			}
		});
	}

	public static void LevelCompleted(int levelId)
	{
		Dictionary<string, object> dictionary = new Dictionary<string, object>();
		dictionary.Add("Level", "Level_" + levelId);
		dictionary.Add("LevelIndex", levelId);
		Dictionary<string, object> dictionary2 = dictionary;
		if (levelId % 20 == 0)
		{
			dictionary2.Add("Level_" + levelId, 1);
		}
		Analytics.CustomEvent("Level Completed", dictionary2);
	}

	public static void SpecialEvent(SpecialEvent itsEvent)
	{
		Analytics.CustomEvent("Special Event", new Dictionary<string, object>
		{
			{
				itsEvent.ToString(),
				1
			}
		});
	}

	public static void GameplayEvent(GameplayEvent itsEvent)
	{
		Analytics.CustomEvent("Special Event", new Dictionary<string, object>
		{
			{
				"Type",
				itsEvent.ToString()
			},
			{
				itsEvent.ToString(),
				1
			}
		});
	}

	public static void ThemeWorldsEvent(ThemeWorldEvent itsEvent, string worldName = "")
	{
		Analytics.CustomEvent("Theme Worlds", new Dictionary<string, object>
		{
			{
				itsEvent.ToString(),
				worldName
			}
		});
	}

	public static void SoundEvent(SoundEvent button, bool state)
	{
		Analytics.CustomEvent("Sound Button Event", new Dictionary<string, object>
		{
			{
				button.ToString(),
				state
			}
		});
	}
}
